# Contributor: V.Krishn <vkrishn4@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=avfs
pkgver=1.1.3
pkgrel=0
pkgdesc="A Virtual File System for looking into archives"
url="http://avf.sourceforge.net/"
arch="all"
license="GPL-2.0-or-later"
depends="bash"
makedepends="zlib-dev bzip2-dev fuse-dev zstd-dev xz-dev"
subpackages="$pkgname-dev"
source="https://downloads.sourceforge.net/project/avf/avfs/$pkgver/avfs-$pkgver.tar.bz2
	fix-PATH_MAX.patch
	"

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--enable-fuse \
		--enable-library \
		--with-system-zlib \
		--with-system-bzlib \
		--with-xz \
		--with-zstd \
		--prefix=/usr \
		--disable-static
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="8e87655cbdb64f0cbbcc399142957ea9e04a998953cc64def9c8bb338b46abffc85a35e09b5fa52bb9ddcf56e27c4f62503050d32c8201eaad61c54e22bdd005  avfs-1.1.3.tar.bz2
281d36f65652a265781e305647a4c1c8f03b851ba458a0b7d9f36119f5489f3b16337019da2b8521695c9bb5cee7ee01ef0a040453c27e1f82f51d858f4940b5  fix-PATH_MAX.patch"
